package com.thinkfit.jy.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.common.lib.bean.DeviceInfoBean;
import com.common.lib.bean.VideoListBean;
import com.thinkfit.jy.R;
import com.thinkfit.jy.utils.ImageLoadUtils;

import org.jetbrains.annotations.NotNull;

public class TrainPatternAdapter extends BaseQuickAdapter<VideoListBean, BaseViewHolder> {

    private Context mContext;

    public TrainPatternAdapter(Context context) {
        super(R.layout.item_rain_pattern);
        mContext = context;
    }


    @Override
    protected void convert(@NotNull BaseViewHolder helper, VideoListBean bean) {
        ImageView ivItem = helper.getView(R.id.iv_item);
        TextView tvTitle = helper.getView(R.id.tv_item_title);
        TextView tvTime = helper.getView(R.id.tv_item_time);
        ImageLoadUtils.getInstance(mContext).setImageUtlRadius(ivItem,bean.getIcon(),0,10);
        tvTitle.setText(bean.getName());
        tvTime.setText(bean.getMin()+mContext.getResources().getString(R.string.app_minutes));
    }


}
